.TH "IXP_SERVERLOOP" 3 "2012 Dec" "libixp Manual"


.SH NAME

.P
ixp_serverloop, IxpServer

.SH SYNOPSIS

.nf
#include <ixp.h>

int ixp_serverloop(IxpServer *srv);

typedef struct IxpServer IxpServer;
struct IxpServer {
        IxpConn*        conn;
        IxpMutex        lk;
        IxpTimer*       timer;
        void            (*preselect)(IxpServer*);
        void*           aux;
        int             running;
        int             maxfd;
        fd_set          rd;
}
.fi


.SH DESCRIPTION

.P
Enters the main loop of the server. Exits when
\fIsrv\fR\->running becomes false, or when select(2) returns an
error other than EINTR.

.SH RETURN VALUE

.P
Returns 0 when the loop exits normally, and 1 when
it exits on error. \fBerrno(3)\fR or the return value of
\fBixp_errbuf(3)\fR may be inspected.

.SH SEE ALSO

.P
ixp_listen(3), ixp_settimer(3)

.\" man code generated by txt2tags 2.6 (http://txt2tags.org)
.\" cmdline: txt2tags -o- ixp_serverloop.man3
